<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>25_CSS复合选择器-交集和并集的说明</title>
        <style>
            p#d1 {
                color: red;
            }

            div#d1 {
                color: green;
            }

        </style>
    </head>
    <body>
        <!-- 交集的选择器中的id或者class必须是当前所在的标签 -->
        <p>晚上吃幸福小馆</p>
        <p>晚上吃幸福小分馆</p>
        <p id="d1">晚上吃幸福小分馆3</p>
        <div>晚上吃幸福小分馆4</div>
    </body>
</html>